package com.plian.Tools.office;

public class MimeTypeUtils {
    public static String getType(String mime) {
        String[] types={
                "zip",
                "rar",
                "pdf",
                "doc",
                "docx",
                "xlsx",
                "xls",

        };
        String[] mimes={
                "application/zip",
                "application/x-rar",
                "application/pdf",
                "application/msword",
                "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
                "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
                "application/vnd.ms-excel",
        };
        String s1="";
        for (int i = 0; i < mimes.length; i++) {
            String s = mimes[i];
            if(mime.equals(s)){
                s1=types[i];
                break;
            }
        }
        return s1;
    }

}
